package com.lyl.syt.constant.sms;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * 腾讯云短信配置文件
 */
@Component
public class TencentSmsConstant implements InitializingBean {
    @Value("${tencentcloud.sms.secretId}")
    private String secretId;

    @Value("${tencentcloud.sms.secretKey}")
    private String secretKey;

    @Value("${tencentcloud.sms.appId}")
    private String appId;
    @Value("${tencentcloud.sms.templateId}")
    private String templateId;
    @Value("${tencentcloud.sms.signName}")
    private String signName;

    public static String SECRET_ID;
    public static String SECRET_KEY;
    public static String APP_ID;
    public static String TEMPLATE_ID;
    public static String SIGN_NAME;

    @Override
    public void afterPropertiesSet() throws Exception {
        SECRET_ID = secretId;
        SECRET_KEY = secretKey;
        APP_ID = appId;
        TEMPLATE_ID = templateId;
        SIGN_NAME = signName;
    }
}
